package com.open.rbac.model.vo.sys;

import jakarta.validation.constraints.NotBlank;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

/**
 * 登录
 *
 * @author Riche's
 * @since 2022/8/15
 */
@Schema(name = "LoginVo", description = "登录参数")
@Getter
@Setter
public class LoginVo {

    @Schema(description = "用户名")
    @NotBlank(message = "用户名为必填项")
    @Length(min = 5, max = 30, message = "用户名长度在5~30之间")
    private String username;

    @NotBlank(message = "用户名为必填项")
    @Length(min = 5, max = 30, message = "密码长度在5~30之间")
    private String password;

    @Schema(description = "验证码")
    //@NotBlank(message = "验证码不能为空")
    //@Length(min = 4, max = 4, message = "验证码只接收4个字符")
    private String captcha;

}
